Abstract
Worst-Case Execution Time (WCET) is an important metric for programs running on real-time systems, and finding precise estimates of a program’s WCET is crucial to avoid wastage of hardware resources and to improve the schedulability of task sets. Caches have a major impact on a program’s execution time, and accurate estimation of a program’s cache behavior can lead to significant reduction in its estimated WCET. The traditional approach to cache analysis generally targets the worst-case cache behavior of individual cache accesses and provides a safe hit-miss classification for every individual access. In this work, we show that these classifications are not sufficient to precisely capture cache behavior, since they apply to individual accesses, and often, more precise predictions can be made about groups of accesses. Further, memory accesses inside loops may show the worst-case behavior only for a subset of the iteration space. In order to predict such behavior in a scalable fashion, we use the fact that the cache behavior of an access mostly depends only on the memory accesses made in the immediate vicinity, and hence we analyze a small, fixed-size neighborhood of every access with complete precision and summarize the resulting information in the form of cache miss paths. A variety of analyses are then performed on the cache miss paths to make precise predictions about cache behavior. We also demonstrate precision issues in Abstract Interpretation-based Must and Persistence cache analysis that can be easily solved using cache miss paths. Experimental results over a wide range of benchmarks demonstrate precision improvement in WCET of multipath programs over previous approaches, and we also show how to integrate our approach with other microarchitectural analysis such as pipeline analysis.
Supplemental Material
Available for Download
Supplemental movie, appendix, image and software files for, Refining Cache Behavior Prediction Using Cache Miss Paths
- Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers, Principles, Techniques. Addison Wesley.Google ScholarDigital Library
- Martin Alt, Christian Ferdinand, Florian Martin, and Reinhard Wilhelm. 1996. Cache behavior prediction by abstract interpretation. In SAS. Springer-Verlag. Google ScholarCross Ref
- S. Andalam, R. Sinha, P. Roop, A. Girault, and J. Reineke. 2013. Precise timing analysis for direct-mapped caches. In Proceedings of the 2013 50th ACM/EDAC/IEEE Design Automation Conference (DAC’13). 1--10. Google ScholarDigital Library
- Abhijeet Banerjee, Sudipta Chattopadhyay, and Abhik Roychoudhury. 2013. Precise micro-architectural modeling for WCET analysis via AI+SAT. In RTAS.Google Scholar
- Pavol Cerny, Thomas A. Henzinger, and Arjun Radhakrishna. 2013. Quantitative abstraction refinement. In POPL. Google ScholarDigital Library
- Sudipta Chattopadhyay and Abhik Roychoudhury. 2011. Scalable and precise refinement of cache timing analysis via model checking. In RTSS. Google ScholarDigital Library
- Duc-Hiep Chu, Joxan Jaffar, and Rasool Maghareh. 2016. Precise cache timing analysis via symbolic execution. In RTAS. Google ScholarCross Ref
- Christoph Cullmann. 2013. Cache persistence analysis: Theory and practice. ACM Transactions on Embedded Computing Systems (TECS) 12, 1s (2013), 40.Google ScholarDigital Library
- Andreas Engelbredt Dalsgaard, Mads C. Olesen, Martin Toft, Ren Rydhof Hansen, and Kim Guldstrand Larsen. 2010. METAMOC: Modular execution time analysis using model checking. In Worst-Case Execution Time Analysis. 113--123. DOI:http://dx.doi.org/10.4230/OASIcs.WCET.2010.113Google Scholar
- Christian Ferdinand and Reinhard Wilhelm. 1999. Efficient and precise cache behavior prediction for real-time systems. Real-Time Systems 17, 2--3 (Dec. 1999), 131--181.Google ScholarDigital Library
- Andreas Gustavsson, Andreas Ermedahl, Björn Lisper, and Paul Pettersson. 2010. Towards WCET analysis of multicore architectures using UPPAAL. In WCET.Google Scholar
- Bach Khoa Huynh, Lei Ju, and Abhik Roychoudhury. 2011. Scope-aware data cache analysis for WCET estimation. In RTAS. Google ScholarDigital Library
- Xianfeng Li, Yun Liang, Tulika Mitra, and Abhik Roychoudury. 2007. Chronos: A timing analyzer for embedded software. Science of Computer Programming 69, 1--3 (2007), 56--67.Google ScholarCross Ref
- Xianfeng Li, Abhik Roychoudhury, and Tulika Mitra. 2006. Modeling out-of-order processors for WCET analysis. Real-Time Systems 34, 3 (2006), 195--227. Google ScholarDigital Library
- Y.-T. S. Li, Sharad Malik, and Andrew Wolfe. 1995. Efficient microarchitecture modeling and path analysis for real-time software. In RTSS.Google Scholar
- Y.-T. S. Li, Sharad Malik, and Andrew Wolfe. 1996. Cache modeling for real-time software: Beyond direct mapped instruction caches. In RTSS.Google Scholar
- Mingsong Lv, Nan Guan, Qingxu Deng, Ge Yu, and Wang Yi. 2011. McAiT A timing analyzer for multicore real-time software. In Automated Technology for Verification and Analysis. Google ScholarCross Ref
- Frank Mueller. 2000. Timing analysis for instruction caches. Real-Time Systems 18, 2--3 (2000), 217--247.Google ScholarDigital Library
- Kartik Nagar and Y. N. Srikant. 2015. Path sensitive cache analysis using cache miss paths. In VMCAI. Google ScholarDigital Library
- Ingomar Wenzel, Raimund Kirner, Peter Puschner, and Bernhard Rieder. 2005. Principles of timing anomalies in superscalar processors. In Proceedings of the 5th International Conference on Quality Software, 2005 (QSIC’05). IEEE, 295--303. Google ScholarDigital Library
- Reinhard Wilhelm. 2004. Why AI + ILP is good for WCET, but MC is not, nor ILP alone. In VMCAI.Google Scholar
- Stephan Wilhelm and Björn Wachter. 2009. Symbolic state traversal for WCET analysis. In Proceedings of the 7th ACM International Conference on Embedded Software (EMSOFT’09). 137--146. Google ScholarDigital Library
Index Terms
- Refining Cache Behavior Prediction Using Cache Miss Paths
Recommendations
Cache miss behavior: is it √2?
CF '06: Proceedings of the 3rd conference on Computing frontiersIt has long been empirically observed that the cache miss rate decreased as a power law of cache size, where the power was approximately -1/2. In this paper, we examine the dependence of the cache miss rate on cache size both theoretically and through ...
Cache Exclusivity and Sharing: Theory and Optimization
A problem on multicore systems is cache sharing, where the cache occupancy of a program depends on the cache usage of peer programs. Exclusive cache hierarchy as used on AMD processors is an effective solution to allow processor cores to have a large ...
Comments